<template>
<div class="demo">
    demo
    <v-btn @click="showMessage">测试消息</v-btn>
    <v-btn @click="showModal">测试模态框</v-btn>
</div>
</template>
<script setup>
// data
const messageStore = useMessageStore()
const modalStore = useModalStore()
// methods
function showMessage() {
    messageStore.success('测试消息')
}
async function showModal() {
    let { confirm } = await modalStore.showModal("测试模态框")
    if (confirm) {
        console.log('点击了确定')
    } else {
        console.log('点击了取消')
    }
}
</script>